#include<iostream>
using namespace std;
int main(){
	int n, m,f1 = 1,f2 = 1,f3;
	cin >> n;
	int count = 0;
	for(int i = 0; i < n; i++){
		cin >> m;
		count = 0; 
		f2 = 1;
		f1 = 1;
		f3 = 1;
		while(m >= 3)
		{
		f3 = f1 + f2;
		f1 = f2;
		f2 = f3;
		m--;
		}
	cout << f3 << endl;
}
	return 0;
}
